<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9.1"/>
<title>IDA SDK: compress.hpp File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">IDA SDK
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.9.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="files.html"><span>Header&#160;Files</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a> &#124;
<a href="#define-members">Macros</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<div class="title">compress.hpp File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Data compression functions. </p>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:affb10bf5d5cc595d755e6dd4ddddb2d0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="pro_8h.html#a8ddba56b40c4be92718f8059abf51147">idaman</a> <a class="el" href="pro_8h.html#acb0b22a01885ebdb9ac572343bbc4dab">THREAD_SAFE</a> int <a class="el" href="pro_8h.html#a176294e75f953787714b9d08ffa89adf">ida_export</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="compress_8hpp.html#affb10bf5d5cc595d755e6dd4ddddb2d0">zip_deflate</a> (void *ud, <a class="el" href="pro_8h.html#ab65ed42d67e6c517c746ff2a6a187016">ssize_t</a>(<a class="el" href="pro_8h.html#a6505e7ff3b129d8b17258304886fd133">idaapi</a> *file_reader)(void *ud, void *buf, size_t size), <a class="el" href="pro_8h.html#ab65ed42d67e6c517c746ff2a6a187016">ssize_t</a>(<a class="el" href="pro_8h.html#a6505e7ff3b129d8b17258304886fd133">idaapi</a> *file_writer)(void *ud, const void *buf, size_t size))</td></tr>
<tr class="memdesc:affb10bf5d5cc595d755e6dd4ddddb2d0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compress data.  <a href="#affb10bf5d5cc595d755e6dd4ddddb2d0">More...</a><br /></td></tr>
<tr class="separator:affb10bf5d5cc595d755e6dd4ddddb2d0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9c8779d6e43ec04f2981d6e05399d7e1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="pro_8h.html#a8ddba56b40c4be92718f8059abf51147">idaman</a> <a class="el" href="pro_8h.html#acb0b22a01885ebdb9ac572343bbc4dab">THREAD_SAFE</a> int <a class="el" href="pro_8h.html#a176294e75f953787714b9d08ffa89adf">ida_export</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="compress_8hpp.html#a9c8779d6e43ec04f2981d6e05399d7e1">zip_inflate</a> (void *ud, <a class="el" href="pro_8h.html#ab65ed42d67e6c517c746ff2a6a187016">ssize_t</a>(<a class="el" href="pro_8h.html#a6505e7ff3b129d8b17258304886fd133">idaapi</a> *file_reader)(void *ud, void *buf, size_t size), <a class="el" href="pro_8h.html#ab65ed42d67e6c517c746ff2a6a187016">ssize_t</a>(<a class="el" href="pro_8h.html#a6505e7ff3b129d8b17258304886fd133">idaapi</a> *file_writer)(void *ud, const void *buf, size_t size))</td></tr>
<tr class="memdesc:a9c8779d6e43ec04f2981d6e05399d7e1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Uncompress data.  <a href="#a9c8779d6e43ec04f2981d6e05399d7e1">More...</a><br /></td></tr>
<tr class="separator:a9c8779d6e43ec04f2981d6e05399d7e1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9e7c4c219f4b5ca739b863acd49993bf"><td class="memItemLeft" align="right" valign="top"><a class="el" href="pro_8h.html#a8ddba56b40c4be92718f8059abf51147">idaman</a> <a class="el" href="pro_8h.html#acb0b22a01885ebdb9ac572343bbc4dab">THREAD_SAFE</a> int <a class="el" href="pro_8h.html#a176294e75f953787714b9d08ffa89adf">ida_export</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="compress_8hpp.html#a9e7c4c219f4b5ca739b863acd49993bf">process_zipfile</a> (const char *zipfile, int(<a class="el" href="pro_8h.html#a6505e7ff3b129d8b17258304886fd133">idaapi</a> *callback)(                               void *ud,                               <a class="el" href="pro_8h.html#a42ae75d34f73b9e691bd16aaddb897e5">qoff64_t</a> offset,                               int method,                               <a class="el" href="pro_8h.html#a2f5563986d7f95e4fad5876c17d9cdda">uint64</a> csize,                               <a class="el" href="pro_8h.html#a2f5563986d7f95e4fad5876c17d9cdda">uint64</a> ucsize,                               <a class="el" href="pro_8h.html#a1134b580f8da4de94ca6b1de4d37975e">uint32</a> attributes,                               const char *filename), void *ud=NULL)</td></tr>
<tr class="memdesc:a9e7c4c219f4b5ca739b863acd49993bf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Process zip file and enumerate all files stored in it.  <a href="#a9e7c4c219f4b5ca739b863acd49993bf">More...</a><br /></td></tr>
<tr class="separator:a9e7c4c219f4b5ca739b863acd49993bf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9ee6da605b671c0bf1daf0a51d1354e2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="pro_8h.html#a8ddba56b40c4be92718f8059abf51147">idaman</a> <a class="el" href="pro_8h.html#acb0b22a01885ebdb9ac572343bbc4dab">THREAD_SAFE</a> int <a class="el" href="pro_8h.html#a176294e75f953787714b9d08ffa89adf">ida_export</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="compress_8hpp.html#a9ee6da605b671c0bf1daf0a51d1354e2">process_zipfile_entry</a> (const char *zipfile, const char *entry, int(<a class="el" href="pro_8h.html#a6505e7ff3b129d8b17258304886fd133">idaapi</a> *callback)(                               void *ud,                               <a class="el" href="pro_8h.html#a42ae75d34f73b9e691bd16aaddb897e5">qoff64_t</a> offset,                               int method,                               <a class="el" href="pro_8h.html#a2f5563986d7f95e4fad5876c17d9cdda">uint64</a> csize,                               <a class="el" href="pro_8h.html#a2f5563986d7f95e4fad5876c17d9cdda">uint64</a> ucsize,                               <a class="el" href="pro_8h.html#a1134b580f8da4de94ca6b1de4d37975e">uint32</a> attributes,                               const char *filename), void *ud=NULL, bool case_sensitive=true)</td></tr>
<tr class="memdesc:a9ee6da605b671c0bf1daf0a51d1354e2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Search for specified entry in zip file, and calls the callback with it, if found.  <a href="#a9ee6da605b671c0bf1daf0a51d1354e2">More...</a><br /></td></tr>
<tr class="separator:a9ee6da605b671c0bf1daf0a51d1354e2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afbf33e6f219123fb0a782572c9efc883"><td class="memItemLeft" align="right" valign="top"><a class="el" href="pro_8h.html#a8ddba56b40c4be92718f8059abf51147">idaman</a> <a class="el" href="pro_8h.html#acb0b22a01885ebdb9ac572343bbc4dab">THREAD_SAFE</a> linput_t *<a class="el" href="pro_8h.html#a176294e75f953787714b9d08ffa89adf">ida_export</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="compress_8hpp.html#afbf33e6f219123fb0a782572c9efc883">create_zip_linput</a> (linput_t *in, <a class="el" href="pro_8h.html#ab65ed42d67e6c517c746ff2a6a187016">ssize_t</a> insize=-1, <a class="el" href="compress_8hpp.html#aa4b9b015580aa8ac2beaf0afaf277b7b">linput_close_code_t</a> loc=<a class="el" href="compress_8hpp.html#aa4b9b015580aa8ac2beaf0afaf277b7baad6af6ef31dd1cc8e937121d62fe8ddc">LOC_CLOSE</a>)</td></tr>
<tr class="memdesc:afbf33e6f219123fb0a782572c9efc883"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a linput to read a compressed input stream.  <a href="#afbf33e6f219123fb0a782572c9efc883">More...</a><br /></td></tr>
<tr class="separator:afbf33e6f219123fb0a782572c9efc883"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:ga6ee624d31271569fddf8cd926d9c1cc5"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga6ee624d31271569fddf8cd926d9c1cc5"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>PKZ_OK</b>&#160;&#160;&#160;0</td></tr>
<tr class="separator:ga6ee624d31271569fddf8cd926d9c1cc5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gace476ff33f614f738290fd476c81aaa6"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gace476ff33f614f738290fd476c81aaa6"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>PKZ_ERRNO</b>&#160;&#160;&#160;1</td></tr>
<tr class="separator:gace476ff33f614f738290fd476c81aaa6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4f50ac8779b4dc84297c0ec44f192280"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga4f50ac8779b4dc84297c0ec44f192280"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>PKZ_STREAM_ERROR</b>&#160;&#160;&#160;2</td></tr>
<tr class="separator:ga4f50ac8779b4dc84297c0ec44f192280"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae5aea341d91a44b8b8181f363123e6ec"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gae5aea341d91a44b8b8181f363123e6ec"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>PKZ_DATA_ERROR</b>&#160;&#160;&#160;3</td></tr>
<tr class="separator:gae5aea341d91a44b8b8181f363123e6ec"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga42d274a8e3c97bb2682b317488bd82ef"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga42d274a8e3c97bb2682b317488bd82ef"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>PKZ_MEM_ERROR</b>&#160;&#160;&#160;4</td></tr>
<tr class="separator:ga42d274a8e3c97bb2682b317488bd82ef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga941a74b6ead343eebe46b680d2654d84"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga941a74b6ead343eebe46b680d2654d84"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>PKZ_BUF_ERROR</b>&#160;&#160;&#160;5</td></tr>
<tr class="separator:ga941a74b6ead343eebe46b680d2654d84"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabd044381a6db5f11ed100171da3506d4"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gabd044381a6db5f11ed100171da3506d4"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>PKZ_VERSION_ERROR</b>&#160;&#160;&#160;6</td></tr>
<tr class="separator:gabd044381a6db5f11ed100171da3506d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac00d6bb1a0d85780d6372a7f12192a85"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gac00d6bb1a0d85780d6372a7f12192a85"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>PKZ_RERR</b>&#160;&#160;&#160;777</td></tr>
<tr class="separator:gac00d6bb1a0d85780d6372a7f12192a85"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5fc873ae97f5621bc1b2e36aa711f986"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga5fc873ae97f5621bc1b2e36aa711f986"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>PKZ_WERR</b>&#160;&#160;&#160;778</td></tr>
<tr class="separator:ga5fc873ae97f5621bc1b2e36aa711f986"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1f104a4798c99e65adde445b937bfe81"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga1f104a4798c99e65adde445b937bfe81"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>STORED</b>&#160;&#160;&#160;0</td></tr>
<tr class="separator:ga1f104a4798c99e65adde445b937bfe81"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga245c0f9c89fab8f7b88c37e7ae68f6b6"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga245c0f9c89fab8f7b88c37e7ae68f6b6"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>SHRUNK</b>&#160;&#160;&#160;1</td></tr>
<tr class="separator:ga245c0f9c89fab8f7b88c37e7ae68f6b6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabd31b293d7cc1096ca45b0b354b94c7c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gabd31b293d7cc1096ca45b0b354b94c7c"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>REDUCED1</b>&#160;&#160;&#160;2</td></tr>
<tr class="separator:gabd31b293d7cc1096ca45b0b354b94c7c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga07fc856eda17528bbef208365ed40931"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga07fc856eda17528bbef208365ed40931"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>REDUCED2</b>&#160;&#160;&#160;3</td></tr>
<tr class="separator:ga07fc856eda17528bbef208365ed40931"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf3ca0a63306a5a39ce0ec6d997b3a064"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaf3ca0a63306a5a39ce0ec6d997b3a064"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>REDUCED3</b>&#160;&#160;&#160;4</td></tr>
<tr class="separator:gaf3ca0a63306a5a39ce0ec6d997b3a064"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae921e5050a73997f51e827ed87f63024"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gae921e5050a73997f51e827ed87f63024"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>REDUCED4</b>&#160;&#160;&#160;5</td></tr>
<tr class="separator:gae921e5050a73997f51e827ed87f63024"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaebf0f3089bc1297e5b067ea0ef850ea5"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaebf0f3089bc1297e5b067ea0ef850ea5"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>IMPLODED</b>&#160;&#160;&#160;6</td></tr>
<tr class="separator:gaebf0f3089bc1297e5b067ea0ef850ea5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafc78300f904d61de427016c0b008b7d3"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gafc78300f904d61de427016c0b008b7d3"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>TOKENIZED</b>&#160;&#160;&#160;7</td></tr>
<tr class="separator:gafc78300f904d61de427016c0b008b7d3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf6abc3a7ae08bd95a7a511ce797f01e6"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaf6abc3a7ae08bd95a7a511ce797f01e6"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>DEFLATED</b>&#160;&#160;&#160;8</td></tr>
<tr class="separator:gaf6abc3a7ae08bd95a7a511ce797f01e6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3c2532a1c8064d74adbe7965908e7f03"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga3c2532a1c8064d74adbe7965908e7f03"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>NUM_METHODS</b>&#160;&#160;&#160;9    /* index of last method + 1 */</td></tr>
<tr class="separator:ga3c2532a1c8064d74adbe7965908e7f03"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:aa4b9b015580aa8ac2beaf0afaf277b7b"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="compress_8hpp.html#aa4b9b015580aa8ac2beaf0afaf277b7b">linput_close_code_t</a> { <a class="el" href="compress_8hpp.html#aa4b9b015580aa8ac2beaf0afaf277b7baad6af6ef31dd1cc8e937121d62fe8ddc">LOC_CLOSE</a>, 
<a class="el" href="compress_8hpp.html#aa4b9b015580aa8ac2beaf0afaf277b7ba8e6cbcffb6b020d0f59ee00f343a533c">LOC_UNMAKE</a>, 
<a class="el" href="compress_8hpp.html#aa4b9b015580aa8ac2beaf0afaf277b7ba0d12bcbc32182c99970dee1058d8b945">LOC_KEEP</a>
 }</td></tr>
<tr class="memdesc:aa4b9b015580aa8ac2beaf0afaf277b7b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Upon closing outer linput, perform one of these actions.  <a href="compress_8hpp.html#aa4b9b015580aa8ac2beaf0afaf277b7b">More...</a><br /></td></tr>
<tr class="separator:aa4b9b015580aa8ac2beaf0afaf277b7b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:a1144aff73a67d41208345118c53fa363"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1144aff73a67d41208345118c53fa363"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="compress_8hpp.html#a1144aff73a67d41208345118c53fa363">legacy_idb</a></td></tr>
<tr class="memdesc:a1144aff73a67d41208345118c53fa363"><td class="mdescLeft">&#160;</td><td class="mdescRight">for old idb files <br /></td></tr>
<tr class="separator:a1144aff73a67d41208345118c53fa363"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a class="anchor" id="aa4b9b015580aa8ac2beaf0afaf277b7b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="compress_8hpp.html#aa4b9b015580aa8ac2beaf0afaf277b7b">linput_close_code_t</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Upon closing outer linput, perform one of these actions. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="aa4b9b015580aa8ac2beaf0afaf277b7baad6af6ef31dd1cc8e937121d62fe8ddc"></a>LOC_CLOSE&#160;</td><td class="fielddoc">
<p>close the inner linput </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="aa4b9b015580aa8ac2beaf0afaf277b7ba8e6cbcffb6b020d0f59ee00f343a533c"></a>LOC_UNMAKE&#160;</td><td class="fielddoc">
<p>unmake the inner linput </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="aa4b9b015580aa8ac2beaf0afaf277b7ba0d12bcbc32182c99970dee1058d8b945"></a>LOC_KEEP&#160;</td><td class="fielddoc">
<p>do nothing </p>
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="affb10bf5d5cc595d755e6dd4ddddb2d0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="pro_8h.html#a8ddba56b40c4be92718f8059abf51147">idaman</a> <a class="el" href="pro_8h.html#acb0b22a01885ebdb9ac572343bbc4dab">THREAD_SAFE</a> int <a class="el" href="pro_8h.html#a176294e75f953787714b9d08ffa89adf">ida_export</a> zip_deflate </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>ud</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pro_8h.html#ab65ed42d67e6c517c746ff2a6a187016">ssize_t</a>(<a class="el" href="pro_8h.html#a6505e7ff3b129d8b17258304886fd133">idaapi</a> *)(void *ud, void *buf, size_t size)&#160;</td>
          <td class="paramname"><em>file_reader</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pro_8h.html#ab65ed42d67e6c517c746ff2a6a187016">ssize_t</a>(<a class="el" href="pro_8h.html#a6505e7ff3b129d8b17258304886fd133">idaapi</a> *)(void *ud, const void *buf, size_t size)&#160;</td>
          <td class="paramname"><em>file_writer</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Compress data. </p>
<p>This function depends on the value of legacy_idb, so it is not completely thread safe. However, legacy_idb does not change its value. </p>

</div>
</div>
<a class="anchor" id="a9c8779d6e43ec04f2981d6e05399d7e1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="pro_8h.html#a8ddba56b40c4be92718f8059abf51147">idaman</a> <a class="el" href="pro_8h.html#acb0b22a01885ebdb9ac572343bbc4dab">THREAD_SAFE</a> int <a class="el" href="pro_8h.html#a176294e75f953787714b9d08ffa89adf">ida_export</a> zip_inflate </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>ud</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pro_8h.html#ab65ed42d67e6c517c746ff2a6a187016">ssize_t</a>(<a class="el" href="pro_8h.html#a6505e7ff3b129d8b17258304886fd133">idaapi</a> *)(void *ud, void *buf, size_t size)&#160;</td>
          <td class="paramname"><em>file_reader</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pro_8h.html#ab65ed42d67e6c517c746ff2a6a187016">ssize_t</a>(<a class="el" href="pro_8h.html#a6505e7ff3b129d8b17258304886fd133">idaapi</a> *)(void *ud, const void *buf, size_t size)&#160;</td>
          <td class="paramname"><em>file_writer</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Uncompress data. </p>
<p>This function depends on the value of legacy_idb, so it is not completely thread safe. However, legacy_idb does not change its value. </p>

</div>
</div>
<a class="anchor" id="a9e7c4c219f4b5ca739b863acd49993bf"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="pro_8h.html#a8ddba56b40c4be92718f8059abf51147">idaman</a> <a class="el" href="pro_8h.html#acb0b22a01885ebdb9ac572343bbc4dab">THREAD_SAFE</a> int <a class="el" href="pro_8h.html#a176294e75f953787714b9d08ffa89adf">ida_export</a> process_zipfile </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>zipfile</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int(<a class="el" href="pro_8h.html#a6505e7ff3b129d8b17258304886fd133">idaapi</a> *)(                                                                                                                   void *ud,                                                                                                                   <a class="el" href="pro_8h.html#a42ae75d34f73b9e691bd16aaddb897e5">qoff64_t</a> offset,                                                                                                                   int method,                                                                                                                   <a class="el" href="pro_8h.html#a2f5563986d7f95e4fad5876c17d9cdda">uint64</a> csize,                                                                                                                   <a class="el" href="pro_8h.html#a2f5563986d7f95e4fad5876c17d9cdda">uint64</a> ucsize,                                                                                                                   <a class="el" href="pro_8h.html#a1134b580f8da4de94ca6b1de4d37975e">uint32</a> attributes,                                                                                                                   const char *filename)&#160;</td>
          <td class="paramname"><em>callback</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>ud</em> = <code>NULL</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Process zip file and enumerate all files stored in it. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">zipfile</td><td>name of zip file </td></tr>
    <tr><td class="paramname">callback</td><td>callback for each file. params:<ul>
<li>ud: user data</li>
<li>offset: offset in the zip file</li>
<li>method: compression method (<a class="el" href="group__compression__methods.html">Compression methods</a>)</li>
<li>csize: compressed size</li>
<li>ucsize: uncompressed size</li>
<li>attributes: file attributes </li>
</ul>
</td></tr>
    <tr><td class="paramname">ud</td><td>user data </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group___p_k_z__.html">Compression error codes</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a9ee6da605b671c0bf1daf0a51d1354e2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="pro_8h.html#a8ddba56b40c4be92718f8059abf51147">idaman</a> <a class="el" href="pro_8h.html#acb0b22a01885ebdb9ac572343bbc4dab">THREAD_SAFE</a> int <a class="el" href="pro_8h.html#a176294e75f953787714b9d08ffa89adf">ida_export</a> process_zipfile_entry </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>zipfile</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>entry</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int(<a class="el" href="pro_8h.html#a6505e7ff3b129d8b17258304886fd133">idaapi</a> *)(                                                                                                                   void *ud,                                                                                                                   <a class="el" href="pro_8h.html#a42ae75d34f73b9e691bd16aaddb897e5">qoff64_t</a> offset,                                                                                                                   int method,                                                                                                                   <a class="el" href="pro_8h.html#a2f5563986d7f95e4fad5876c17d9cdda">uint64</a> csize,                                                                                                                   <a class="el" href="pro_8h.html#a2f5563986d7f95e4fad5876c17d9cdda">uint64</a> ucsize,                                                                                                                   <a class="el" href="pro_8h.html#a1134b580f8da4de94ca6b1de4d37975e">uint32</a> attributes,                                                                                                                   const char *filename)&#160;</td>
          <td class="paramname"><em>callback</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>ud</em> = <code>NULL</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>case_sensitive</em> = <code>true</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Search for specified entry in zip file, and calls the callback with it, if found. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">zipfile</td><td>name of zip file </td></tr>
    <tr><td class="paramname">entry</td><td>entry in zip file. E.g., "path/to/entry.dat" </td></tr>
    <tr><td class="paramname">callback</td><td>callback for each file. params:<ul>
<li>ud: user data</li>
<li>offset: offset in the zip file</li>
<li>method: compression method (<a class="el" href="group__compression__methods.html">Compression methods</a>)</li>
<li>csize: compressed size</li>
<li>ucsize: uncompressed size</li>
<li>attributes: file attributes </li>
</ul>
</td></tr>
    <tr><td class="paramname">ud</td><td>user data </td></tr>
    <tr><td class="paramname">case_sensitive</td><td>should the search be case sensitive? </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group___p_k_z__.html">Compression error codes</a> </dd></dl>

</div>
</div>
<a class="anchor" id="afbf33e6f219123fb0a782572c9efc883"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="pro_8h.html#a8ddba56b40c4be92718f8059abf51147">idaman</a> <a class="el" href="pro_8h.html#acb0b22a01885ebdb9ac572343bbc4dab">THREAD_SAFE</a> linput_t* <a class="el" href="pro_8h.html#a176294e75f953787714b9d08ffa89adf">ida_export</a> create_zip_linput </td>
          <td>(</td>
          <td class="paramtype">linput_t *&#160;</td>
          <td class="paramname"><em>in</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pro_8h.html#ab65ed42d67e6c517c746ff2a6a187016">ssize_t</a>&#160;</td>
          <td class="paramname"><em>insize</em> = <code>-1</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="compress_8hpp.html#aa4b9b015580aa8ac2beaf0afaf277b7b">linput_close_code_t</a>&#160;</td>
          <td class="paramname"><em>loc</em> = <code><a class="el" href="compress_8hpp.html#aa4b9b015580aa8ac2beaf0afaf277b7baad6af6ef31dd1cc8e937121d62fe8ddc">LOC_CLOSE</a></code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Create a linput to read a compressed input stream. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">in</td><td>linput with compressed data, seeked to the stream beginning </td></tr>
    <tr><td class="paramname">insize</td><td>size of compressed data. -1 - unknown </td></tr>
    <tr><td class="paramname">loc</td><td>what to do upon closing the resulting linput </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>linput that can be used to read uncompressed data. NULL if any error (no more linput descriptors). </dd></dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.9.1
</small></address>
</body>
</html>
